<template>
  <div>

     {{list1}}
     <br>
     {{name}}
     <van-row>

        <van-col span="6">
        <table>
        <tr>
          <th>名称</th>

        </tr>
        <tr v-for="i in list1" :key="i.id">
          <td @click="on(i.name,1)" >{{i.name}}</td>
         
        </tr>
     </table>
        </van-col>

        <van-col span="10">
            <p v-if="a==1">
              {{name}}
              <br>
              <van-checkbox-group v-model="checked" direction="horizontal">
            <van-checkbox name="a"> 同意 </van-checkbox>
            <van-checkbox name="b"> 不同意 </van-checkbox>
          </van-checkbox-group>
          <br>
          审批意见：<van-field placeholder="请输入"/><br>
          <van-button> 提交 </van-button>
              </p>
            



        </van-col>

        


     </van-row>


      



  </div>
</template>

<script>
import { ref } from 'vue';
import axios from '../../http/axios'
export default {
  setup() {
    const checked = ref([]);
    return { checked };
  },
  data(){
    return{
      list1:[],
      id:1,
      a:0,
      name:'',
      datas:[]
     
    }
  },

  methods:{


    gettask(){

      axios('mytaskaudit','get').then(res=>{
        console.log(res);
          this.list1 = res.list
      })

    },
    on(name,i){

    this.a = i,
    this.name = name
    },
     getidoff(){
            
            axios('/getoffid?name='+this.name,'get').then(res=>{
                // this.datas = res.list
                console.log(res);
            })
        },

  },

  mounted(){
    this.gettask()


  }

}
</script>

<style>

</style>